<link rel="stylesheet" type="text/css" href="css/index.css"/>
<script type="text/javascript" src="js/md5.js"></script>
<script type="text/javascript">document.title="登录{$title}"</script>
<script type="text/javascript" src="js/jquery-1.4.2.min.js"></script>
<!--主体-->
<div class="main" style="position:relative; z-index:9;">
<div class="banner">
{$bannerhtml}
<!--<ul class="ban_dian" id="navi">
	<li class="curli"></li>
	<li></li>
	<li></li>
</ul>-->
<script type="text/javascript" src="js/jquery.nivo.slider.pack.js"></script> 
<script type="text/javascript" src="js/layer/layer.min.js"></script> 
<script type="text/javascript">
	$(window).load(function() {
		$('#slider').nivoSlider();
	});
</script>
<div class="login_bg"></div>
<form action="dlogin_dt.php" method="post" target="ifr" >
	<input type="hidden" id="password" name="password" />
	<input type="hidden" name="to" value="{$from}" />
	<div class="ind_login">
		<h4>登录{$title}</h4>
		<p>
			<span>账户名：</span><input id="port" type="text" class="inputlogin" name="passport" value="{$passport}" style="{$style}" onfocus="cl(this)" onblur="cl(this)" />
		</p>
		<p>
			<span>登录密码：</span><input type="password" class="inputlogin pawd" id="ps" onfocus="inputTxt(this,1)" onblur="inputTxt(this)"/>
		</p>
		<p>
			<input type="button" class="login_btn" onclick="Log();" value="登&nbsp;&nbsp;&nbsp;&nbsp;录" />
			<!--
			<input type="button" class="login_btn logs" value="免费注册" onclick="window.location.href='register.html'" />
			-->
			{$showReg}
		</p>
		<p class="txtce">
			<a onclick="window.location='forget.html'+($('#port').val()?'?passport='+$('#port').val():'')" href="###">忘记登录密码？</a><br />
			服务咨询电话：{$servertel}
		</p>
	</div>
</form>
<iframe style="display:none;" name="ifr"></iframe>

</div>


{$talkqq}
{$advHtml}
</div>
<div times="1" id="xubox_shade1" class="xubox_shade" style="z-index:19891015; background-color:#000; opacity:0.3; filter:alpha(opacity=30);display:none;"></div>
<div times="1" showtime="0" style="z-index: 19891015; width: auto; height: auto; margin-left: -64px; top: 311px; left: 50%;display:none;" id="xubox_layer1" class="xubox_layer" type="dialog"><div style="z-index: 19891015; height: 45px; background-color: rgb(255, 255, 255);" class="xubox_main"><div class="xubox_dialog"><span class="xubox_msg xulayer_png32 xubox_msgico xubox_msgtype16" style="top: 8px;"></span><span class="xubox_msg xubox_text" style="margin-top: 11px;">登录中…</span></div><span class="xubox_setwin"></span><span class="xubox_botton"></span></div><div id="xubox_border1" class="xubox_border" style="z-index: 19891014; opacity: 0.3; top: -6px; left: -6px; width: 140px; height: 57px; background-color: rgb(0, 0, 0);"></div></div>
<script type="text/javascript">
var port=document.getElementById("port");
var ps=document.getElementById("ps");
var yz=document.getElementById("yz");
document.body.onkeydown=function(e){
	if(!e)e=event;
	if(e.keyCode==13 && ps.value && port.value)	Log();
}
port.onkeydown=function(e){
	if(!e)e=event;
	if(e.keyCode==13 && this.value)	ps.focus();
}
function Log(){
	// var exdate=new Date()
	// exdate.setDate(exdate.getDate()+7);
	// document.cookie="passport="+document.getElementById("port").value+";expires="+exdate.toGMTString()+";";
	// var ps=document.getElementById("ps").value;
	// var p=document.getElementById("password");
	// p.value=hex_md5(ps);
	// document.forms[0].submit();
	
	var exdate=new Date()
	exdate.setDate(exdate.getDate()+7);
	document.cookie="passport="+document.getElementById("port").value+";expires="+exdate.toGMTString()+";";
	var ps=document.getElementById("ps").value;
	var passport = document.getElementById("port");
	var pass = hex_md5(ps);
	$("#xubox_layer1").show();
	$("#xubox_shade1").show();
	$.post('dlogin_dt.php',{passport:passport.value,password:pass},function(res){
		res = JSON.parse(res);
		if(res.reqState=='fail'){
			alert(res.msg);
			// layer.close(loadi);
			$("#xubox_layer1").hide();
			$("#xubox_shade1").hide();
		}else{
			window.location.href="home.html";
		}
	});
	
};

function inputTxt(t,p){
	if(p){
		if(t.value==""){
			t.value='';
		}
		t.style.color='#333';
	}
	else{
		if(t.value==""){
			t.value='';
		}
		t.style.color='#C9C9C9';
	}
}
function cl(c){
	if(c.value=="商户ID或手机号码"){
		c.value="";
		c.style.color="#000";
		return;
	}
	if(c.value==""){
		c.value="商户ID或手机号码";
		c.style.color="#C9C9C9";
		return;
	}
}
</script>
{$baiduHtml}